#include "main.h"
#include "led.h"
/*
     *          实验名称:LED GPIO实验
     *          创建日期:2019.10.1
     *          作者:armwind
     *          实验说明:实验中用到systick进行延时，这里如果是初学者先不要关心这个。关注调用哪个函数就好
  * */

/**
  * @brief  Main program.
  * @param  None
  * @retval None
  */
int main(void)
{
    delay_init ();              //延时函数初始化，起始是systick初始化
    led_init ();                //led外设GPIO初始化
    /* Infinite loop */
    while (1) {
            led_set (LED_ON);   //点亮LED
            delay_ms (200);     //延时500ms
            led_set (LED_OFF);  //灭掉LED
            delay_ms (200);     //延时500ms
    }
}


#ifdef  USE_FULL_ASSERT

/**
  * @brief  Reports the name of the source file and the source line number
  *         where the assert_param error has occurred.
  * @param  file: pointer to the source file name
  * @param  line: assert_param error line source number
  * @retval None
  */
void assert_failed(uint8_t* file, uint32_t line)
{ 
  /* User can add his own implementation to report the file name and line number,
     ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */

  /* Infinite loop */
  while (1)
  {
  }
}
#endif

/**
  * @}
  */


/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
